package com.aaa.doctor.controller.api;


import com.aaa.doctor.service.MedicinesService;
import com.aaa.doctor.vo.MedicinesVo;
import com.aaa.entity.Medicines;
import com.aaa.vo.Result;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/doctor/medicines")
public class MedicinesController {

    @Autowired
    private MedicinesService medicinesService;

    /**
     * 根据条件查询药品信息
     * @param pageCurrent
     * @param pageSize
     * @param medicinesVo
     * @return
     */
    @PostMapping("/listMedicinesForPage/{pageCurrent}/{pageSize}")
    public Result<IPage<Medicines>> listMedicinesForPage(
            @PathVariable Integer pageCurrent,
            @PathVariable Integer pageSize,
            @RequestBody MedicinesVo medicinesVo){
        return medicinesService.listMedicinesForPage(pageCurrent,pageSize,medicinesVo);
    }

}
